POV-Ray : Newsgroups : povray.unofficial.patches : complicated functions : Re: complicated functions Server Time
2 Sep 2024 02:16:01 EDT (-0400)
  Re: complicated functions  
From: Pabs
Date: 13 Nov 2000 01:35:29
Message: <3A0F8C00.5FC694EB@hotmail.com>
Chris Huff wrote:

> In article <3A0B61CC.86B37226@hotmail.com>, Pabs <pab### [at] hotmailcom>
> wrote:
>
> > Why not just use shaders to specify the isosurface funcs?
>
> I assume you mean replace functions with shaders...that would most
> likely be slower. Isosurface functions are designed to take a simple
> equation and return a float value, shaders take all sorts of
> instructions and calculate a color. It would also be harder to write the
> scene code...functions are a lot simpler than shaders.
> I think a syntax like this would be most useful:
>
> #declare Sphere =
> function(x, y, z, Px, Py, Pz, R)
> {
>     r - sqrt((x-Px)^2 + (y-Py)^2 + (z-Pz)^2)
> }
>
> The "x, y, z" variables would be the default, but you could specify your
> own variables to use instead.

I agree with all that but what if you need a pattern that cannot be
generated by a mathematical formula but by an algorithmn of some sort. -
s'pose you would just have to recompile the src with your pattern built in.
--
Bye
Pabs


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.